#ifndef WIFI_LOWLEVEL_h
#define WIFI_LOWLEVEL_h

#include "stm32f10x.h"

#define WIFI_UART				USART3
#define WIFI_UART_CLK			RCC_APB1Periph_USART3
#define WIFI_UART_CLK_INIT		RCC_APB1PeriphClockCmd
#define WIFI_UART_IRQn			USART3_IRQn
#define WIFI_UART_IRQHandler	USART3_IRQHandler

#define WIFI_TX_PIN				GPIO_Pin_10
#define WIFI_TX_PORT			GPIOB
#define WIFI_TX_CLK				RCC_APB2Periph_GPIOB

#define WIFI_RX_PIN				GPIO_Pin_11
#define WIFI_RX_PORT			GPIOB
#define WIFI_RX_CLK				RCC_APB2Periph_GPIOB

#define WIFI_EN_PIN				GPIO_Pin_14
#define WIFI_EN_PORT			GPIOC
#define WIFI_EN_CLK				RCC_APB2Periph_GPIOC

#define WIFI_RST_PIN			GPIO_Pin_0
#define WIFI_RST_PORT			GPIOA
#define WIFI_RST_CLK			RCC_APB2Periph_GPIOA


void WiFi_LowLevel_Init(void);
void WiFi_Setup(char *atcmd);
void WiFi_Send(void *dat,int len);
void WiFi_Enable(void);
void WiFi_Disable(void);
void WiFi_Reset(void);

#endif
